
*** Creating Figure 2: CATEs of Tear Gas Usage in Hong Kong's Constituencies


* making the map
cd ""

import delimited "make_map.csv", varnames(1) clear // csv file exported from CF results 
rename mapid2019 id2019
rename resulttauhat htes
drop v1
save "make_map.dta", replace

format htes %13.2f
use "hkdb.dta", clear
keep id 编号
rename 编号 id2019 
merge m:1 id2019 using "make_map.dta"
replace htes=0 if significant==0
drop _merge id2019 significant

spmap htes using hkcoord, id(id) fcolor(YlGn) legend(pos(6) row(2) ring(1))

